package com.jianguozh.difs.support.service.base.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jianguozh.difs.support.service.base.entity.Config;
import com.jianguozh.difs.support.service.component.setting.Setting;
import com.jianguozh.difs.support.service.constant.enums.ConfigTypeEnum;

import java.util.Map;

/**
 * <p>
 * 配置 服务类
 * </p>
 *
 * @author hanrs
 * @since 2022-06-09
 */
public interface IConfigService extends IService<Config> {

    /**
     * 由类型获取配置
     *
     * @param configTypeEnum
     * @return
     */
    Config getByType(ConfigTypeEnum configTypeEnum);

    /**
     * 从map中解析设置
     *
     * @param configTypeEnum
     * @param settingMap
     * @return
     */
    Setting parseSetting(ConfigTypeEnum configTypeEnum, Map<String, Object> settingMap);

}
